package com.md.request;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.md.util.StringUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Optional;


/**
 * @author 刘骄阳
 * 2022-09-24 1:24
 */
@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
@ApiModel("查询日志链路请求实体")
public class QueryLogsTreeRequest {
  @ApiModelProperty("业务id")
  private String dataId;

  @ApiModelProperty("是否需要映射(默认: false): true: 需要; false: 不需要;")
  private Boolean needMap;

  @Override
  public String toString() {
    return StringUtil.objectToJson(this);
  }

  public Boolean getNeedMap() {
    return Optional.ofNullable(needMap).orElse(false);
  }

}
